<!DOCTYPE head PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body>
<div class="subnav">
  <div class="content-menu ib-a blue line-x"></div>
</div>
<div class="pad-lr-10">
  <div class="Item hr"> <span class="fr">数据库中共有&nbsp;{$tables}&nbsp;张表，共计{$total}</span> </div>
  <form method="post" action="__URL__/backup" id="backupdata">
    <div class="table-list">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tbody>
          <tr>
            <td width="90" align="center"><label>
                <input value="" id="check_box" onClick="selectall('table[]');" type="checkbox">
                全选 </label></td>
            <td align="center">表名</td>
            <td align="center">表用途</td>
            <td align="center">记录行数</td>
            <td align="center">引擎类型</td>
            <td align="center">字符集</td>
            <td align="center">表大小</td>
          </tr>
          <volist name="list" id="tab">
            <tr align="center">
              <td align="center"><input type="checkbox" name="table[]" value="{$tab.Name}"/></td>
              <td align="center">{$tab.Name}</td>
              <td align="center">{$tab.Comment}</td>
              <td align="center">{$tab.Rows}</td>
              <td align="center">{$tab.Engine}</td>
              <td align="center">{$tab.Collation}</td>
              <td align="center">{$tab.size}</td>
            </tr>
          </volist>
          <tr>
            <td width="90" align="center"></td>
            <td align="center">表名</td>
            <td align="center">表用途</td>
            <td align="center">记录行数</td>
            <td align="center">引擎类型</td>
            <td align="center">字符集</td>
            <td align="center">总计：{$total}</td>
          </tr>
        </tbody>
      </table>
    </div>
  </form>
  <div class="btn" >
    <input type="button" class="button submit" value="备份所选" />
  </div>
</div>
<div class="clear"></div>
<script type="text/javascript">
            $(function(){
                //clickCheckbox();
                $(".submit").click(function(){
                    if($("tbody input[type='checkbox']:checked").size()==0){
						$.dialog.alert('请先选择你要备份的数据库表吧。');
                        return false;
                    }else{
						$('#backupdata').submit();
					}
                    /*if($(this).attr("disabledSubmit")){
						$.dialog.alert('已提交，系统在处理中...');
                    }else{
                        $(this).attr("disabledSubmit",true).html("提交处理中...");
                        commonAjaxSubmit("__URL__/backup");
//                        popup.alert("系统处理中，如果数据库中数据较多可能需要较长时间，请稍候....");
                        setTimeout(function(){
                           $.dialog.alert('已处理');
                        },2000);
                    }*/
                });
            });
        </script>
</body>
</html>